3.161 \(\int \frac{(a+b \log (c x^n)) (d+e \log (f x^r))}{x^3} \, dx\)

Optimal. Leaf size=83 \[ -\frac{\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{2 x^2}-\frac{e r \left (2 a+2 b \log \left (c x^n\right )+b n\right )}{8 x^2}-\frac{b n \left (d+e \log \left (f x^r\right )\right )}{4 x^2}-\frac{b e n r}{8 x^2} \]

[Out]

-(b*e*n*r)/(8*x^2) - (e*r*(2*a + b*n + 2*b*Log[c*x^n]))/(8*x^2) - (b*n*(d + e*Log[f*x^r]))/(4*x^2) - ((a + b*L
og[c*x^n])*(d + e*Log[f*x^r]))/(2*x^2)

________________________________________________________________________________________

Rubi [A]  time = 0.0726216, antiderivative size = 83, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {2304, 2366, 12} \[ -\frac{\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{2 x^2}-\frac{e r \left (2 a+2 b \log \left (c x^n\right )+b n\right )}{8 x^2}-\frac{b n \left (d+e \log \left (f x^r\right )\right )}{4 x^2}-\frac{b e n r}{8 x^2} \]

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*x^n])*(d + e*Log[f*x^r]))/x^3,x]

[Out]

-(b*e*n*r)/(8*x^2) - (e*r*(2*a + b*n + 2*b*Log[c*x^n]))/(8*x^2) - (b*n*(d + e*Log[f*x^r]))/(4*x^2) - ((a + b*L
og[c*x^n])*(d + e*Log[f*x^r]))/(2*x^2)

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2366

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.))*((g_.)*(x_))^(m_.), x_Sy
mbol] :> With[{u = IntHide[(g*x)^m*(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[Sim
plifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, r}, x] &&  !(EqQ[p, 1] && EqQ[a, 0] &&
 NeQ[d, 0])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rubi steps

\begin{align*} \int \frac{\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{x^3} \, dx &=-\frac{b n \left (d+e \log \left (f x^r\right )\right )}{4 x^2}-\frac{\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{2 x^2}-(e r) \int \frac{-2 a \left (1+\frac{b n}{2 a}\right )-2 b \log \left (c x^n\right )}{4 x^3} \, dx\\ &=-\frac{b n \left (d+e \log \left (f x^r\right )\right )}{4 x^2}-\frac{\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{2 x^2}-\frac{1}{4} (e r) \int \frac{-2 a \left (1+\frac{b n}{2 a}\right )-2 b \log \left (c x^n\right )}{x^3} \, dx\\ &=-\frac{b e n r}{8 x^2}-\frac{e r \left (2 a+b n+2 b \log \left (c x^n\right )\right )}{8 x^2}-\frac{b n \left (d+e \log \left (f x^r\right )\right )}{4 x^2}-\frac{\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{2 x^2}\\ \end{align*}

Mathematica [A]  time = 0.0696156, size = 64, normalized size = 0.77 \[ -\frac{e (2 a+b n) \log \left (f x^r\right )+2 a d+a e r+b \log \left (c x^n\right ) \left (2 d+2 e \log \left (f x^r\right )+e r\right )+b d n+b e n r}{4 x^2} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*x^n])*(d + e*Log[f*x^r]))/x^3,x]

[Out]

-(2*a*d + b*d*n + a*e*r + b*e*n*r + e*(2*a + b*n)*Log[f*x^r] + b*Log[c*x^n]*(2*d + e*r + 2*e*Log[f*x^r]))/(4*x
^2)

________________________________________________________________________________________

Maple [C]  time = 0.19, size = 1442, normalized size = 17.4 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))*(d+e*ln(f*x^r))/x^3,x)

[Out]

-1/4*e*(-I*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+I*b*Pi*csgn(I*c)*csgn(I*c*x^n)^2+I*b*Pi*csgn(I*x^n)*csgn(I
*c*x^n)^2-I*b*Pi*csgn(I*c*x^n)^3+2*b*ln(c)+b*n+2*b*ln(x^n)+2*a)/x^2*ln(x^r)-1/8*(2*a*e*r+2*b*d*n+4*a*d+2*I*ln(
c)*Pi*b*e*csgn(I*f)*csgn(I*f*x^r)^2+2*I*ln(c)*Pi*b*e*csgn(I*x^r)*csgn(I*f*x^r)^2+2*I*Pi*ln(f)*b*e*csgn(I*c)*cs
gn(I*c*x^n)^2+2*I*Pi*b*e*csgn(I*x^r)*csgn(I*f*x^r)^2*ln(x^n)-I*n*Pi*b*e*csgn(I*f*x^r)^3-Pi^2*b*e*csgn(I*c)*csg
n(I*x^n)*csgn(I*c*x^n)*csgn(I*f*x^r)^3+4*ln(c)*ln(f)*b*e+2*ln(c)*b*e*r+2*n*ln(f)*b*e+2*I*Pi*ln(f)*b*e*csgn(I*x
^n)*csgn(I*c*x^n)^2-2*I*Pi*a*e*csgn(I*f)*csgn(I*x^r)*csgn(I*f*x^r)-2*I*Pi*b*d*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x
^n)+4*ln(c)*b*d+4*ln(f)*a*e-I*Pi*b*e*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gn(I*f*x^
r)^2-Pi^2*b*e*csgn(I*c*x^n)^3*csgn(I*f)*csgn(I*x^r)*csgn(I*f*x^r)-Pi^2*b*e*csgn(I*c)*csgn(I*c*x^n)^2*csgn(I*f)
*csgn(I*f*x^r)^2-Pi^2*b*e*csgn(I*c)*csgn(I*c*x^n)^2*csgn(I*x^r)*csgn(I*f*x^r)^2-Pi^2*b*e*csgn(I*x^n)*csgn(I*c*
x^n)^2*csgn(I*f)*csgn(I*f*x^r)^2-Pi^2*b*e*csgn(I*x^n)*csgn(I*c*x^n)^2*csgn(I*x^r)*csgn(I*f*x^r)^2+Pi^2*b*e*csg
n(I*c)*csgn(I*c*x^n)^2*csgn(I*f*x^r)^3+Pi^2*b*e*csgn(I*x^n)*csgn(I*c*x^n)^2*csgn(I*f*x^r)^3+Pi^2*b*e*csgn(I*c*
x^n)^3*csgn(I*f)*csgn(I*f*x^r)^2+Pi^2*b*e*csgn(I*c*x^n)^3*csgn(I*x^r)*csgn(I*f*x^r)^2-2*I*ln(c)*Pi*b*e*csgn(I*
f*x^r)^3-2*I*Pi*ln(f)*b*e*csgn(I*c*x^n)^3+2*I*Pi*a*e*csgn(I*f)*csgn(I*f*x^r)^2+2*I*Pi*a*e*csgn(I*x^r)*csgn(I*f
*x^r)^2+2*I*Pi*b*d*csgn(I*c)*csgn(I*c*x^n)^2)/x^2

________________________________________________________________________________________

Maxima [A]  time = 1.1727, size = 126, normalized size = 1.52 \begin{align*} -\frac{1}{4} \, b e{\left (\frac{r}{x^{2}} + \frac{2 \, \log \left (f x^{r}\right )}{x^{2}}\right )} \log \left (c x^{n}\right ) - \frac{b e n{\left (r + \log \left (f\right ) + \log \left (x^{r}\right )\right )}}{4 \, x^{2}} - \frac{b d n}{4 \, x^{2}} - \frac{a e r}{4 \, x^{2}} - \frac{b d \log \left (c x^{n}\right )}{2 \, x^{2}} - \frac{a e \log \left (f x^{r}\right )}{2 \, x^{2}} - \frac{a d}{2 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*(d+e*log(f*x^r))/x^3,x, algorithm="maxima")

[Out]

-1/4*b*e*(r/x^2 + 2*log(f*x^r)/x^2)*log(c*x^n) - 1/4*b*e*n*(r + log(f) + log(x^r))/x^2 - 1/4*b*d*n/x^2 - 1/4*a
*e*r/x^2 - 1/2*b*d*log(c*x^n)/x^2 - 1/2*a*e*log(f*x^r)/x^2 - 1/2*a*d/x^2

________________________________________________________________________________________

Fricas [A]  time = 0.768871, size = 266, normalized size = 3.2 \begin{align*} -\frac{2 \, b e n r \log \left (x\right )^{2} + b d n + 2 \, a d +{\left (b e n + a e\right )} r +{\left (b e r + 2 \, b d\right )} \log \left (c\right ) +{\left (b e n + 2 \, b e \log \left (c\right ) + 2 \, a e\right )} \log \left (f\right ) + 2 \,{\left (b e r \log \left (c\right ) + b e n \log \left (f\right ) + b d n +{\left (b e n + a e\right )} r\right )} \log \left (x\right )}{4 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*(d+e*log(f*x^r))/x^3,x, algorithm="fricas")

[Out]

-1/4*(2*b*e*n*r*log(x)^2 + b*d*n + 2*a*d + (b*e*n + a*e)*r + (b*e*r + 2*b*d)*log(c) + (b*e*n + 2*b*e*log(c) +
2*a*e)*log(f) + 2*(b*e*r*log(c) + b*e*n*log(f) + b*d*n + (b*e*n + a*e)*r)*log(x))/x^2

________________________________________________________________________________________

Sympy [B]  time = 11.4372, size = 201, normalized size = 2.42 \begin{align*} - \frac{a d}{2 x^{2}} - \frac{a e r \log{\left (x \right )}}{2 x^{2}} - \frac{a e r}{4 x^{2}} - \frac{a e \log{\left (f \right )}}{2 x^{2}} - \frac{b d n \log{\left (x \right )}}{2 x^{2}} - \frac{b d n}{4 x^{2}} - \frac{b d \log{\left (c \right )}}{2 x^{2}} - \frac{b e n r \log{\left (x \right )}^{2}}{2 x^{2}} - \frac{b e n r \log{\left (x \right )}}{2 x^{2}} - \frac{b e n r}{4 x^{2}} - \frac{b e n \log{\left (f \right )} \log{\left (x \right )}}{2 x^{2}} - \frac{b e n \log{\left (f \right )}}{4 x^{2}} - \frac{b e r \log{\left (c \right )} \log{\left (x \right )}}{2 x^{2}} - \frac{b e r \log{\left (c \right )}}{4 x^{2}} - \frac{b e \log{\left (c \right )} \log{\left (f \right )}}{2 x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))*(d+e*ln(f*x**r))/x**3,x)

[Out]

-a*d/(2*x**2) - a*e*r*log(x)/(2*x**2) - a*e*r/(4*x**2) - a*e*log(f)/(2*x**2) - b*d*n*log(x)/(2*x**2) - b*d*n/(
4*x**2) - b*d*log(c)/(2*x**2) - b*e*n*r*log(x)**2/(2*x**2) - b*e*n*r*log(x)/(2*x**2) - b*e*n*r/(4*x**2) - b*e*
n*log(f)*log(x)/(2*x**2) - b*e*n*log(f)/(4*x**2) - b*e*r*log(c)*log(x)/(2*x**2) - b*e*r*log(c)/(4*x**2) - b*e*
log(c)*log(f)/(2*x**2)

________________________________________________________________________________________

Giac [A]  time = 1.2139, size = 157, normalized size = 1.89 \begin{align*} -\frac{2 \, b n r e \log \left (x\right )^{2} + 2 \, b n r e \log \left (x\right ) + 2 \, b r e \log \left (c\right ) \log \left (x\right ) + 2 \, b n e \log \left (f\right ) \log \left (x\right ) + b n r e + b r e \log \left (c\right ) + b n e \log \left (f\right ) + 2 \, b e \log \left (c\right ) \log \left (f\right ) + 2 \, b d n \log \left (x\right ) + 2 \, a r e \log \left (x\right ) + b d n + a r e + 2 \, b d \log \left (c\right ) + 2 \, a e \log \left (f\right ) + 2 \, a d}{4 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*(d+e*log(f*x^r))/x^3,x, algorithm="giac")

[Out]

-1/4*(2*b*n*r*e*log(x)^2 + 2*b*n*r*e*log(x) + 2*b*r*e*log(c)*log(x) + 2*b*n*e*log(f)*log(x) + b*n*r*e + b*r*e*
log(c) + b*n*e*log(f) + 2*b*e*log(c)*log(f) + 2*b*d*n*log(x) + 2*a*r*e*log(x) + b*d*n + a*r*e + 2*b*d*log(c) +
 2*a*e*log(f) + 2*a*d)/x^2